﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using YYSite.Common;
using YYSite.Common.NHibernate;
using YYSite.Domain.System.Permissions;

namespace YYSite.Repository.System.Permissions
{
    public class PermissionRepository : Repository<Permission>, IPermissionRepository
    {
        public PermissionRepository(ITransactionManager transactionManager) : base(transactionManager)
        {
        }

        public DataGridOutput<Permission> GetPermissionByPage(GetPermissionDataGridInput input)
        {
            input.Initialize();
            string sql = "SELECT * FROM  [System].[Permission]"+input.GetSQL();
            return this.Session.QueryPaged<Permission>( sql,input.GetParameters(), input.GetOrderBy(),input);

        }
    }
}


